//
//  CAGoodsListApi.m
//  LNH
//
//  Created by twentylx on 2018/2/6.
//  Copyright © 2018年 twentylx. All rights reserved.
//

#import "CAGoodsListApi.h"

@implementation CAGoodsListApi {
    NSString * _category;
    NSString * _isFavourable;
    NSString *_isVip;
    NSString *_isSecond;
    NSString *_goodsName;
    NSString *_page;
}

- (instancetype) initWithCategory:(NSString *) category IsFavourable:(NSString *) isFavourable IsVip:(NSString *)isVip IsSecond:(NSString *)isSecond GoodsName:(NSString *)goodsName Page:(NSString *)page{
    self = [super init];
    if (self) {
        _category = category;
        _isFavourable = isFavourable;
        _isVip = isVip;
        _isSecond = isSecond;
        _goodsName = goodsName;
        _page = page;
    }
    return self;
}

-(YTKRequestMethod)requestMethod{
    return YTKRequestMethodGET;
}

-(id)requestArgument{
    NSLog(@"token=%@",GVUD.token);
    return @{
             @"token":GVUD.token,
             @"category":_category,
             @"is_favourable":_isFavourable,
             @"is_vip":_isVip,
             @"is_second":_isSecond,
             @"goods_name":_goodsName,
             @"page":_page,
             };
}

-(NSString *)requestUrl{
    NSLog(@"%@", [NSString stringWithFormat:@"%@goods/list",BASE_SERVICE_DOMAIN]);
    return [NSString stringWithFormat:@"%@goods/list",BASE_SERVICE_DOMAIN];
    
    
}

@end
